/**
 * 
 */


function comfirmDialogHandler()
{
	if (!isNaN(document.colorCondition.redDuration.value)
			&& !isNaN(document.colorCondition.yellowDuration.value)) {
		
	    
	    	$('body').append('<div class="ui-widget-overlay" style="width: '+screen.width+'px; height: '+screen.height+'px; z-index: 1001;">'+							
					'</div>'+
					'<div class="waiting-message" >'+
					'<font color="#2E6E9E">Saving...</font>'+
				'</div>'
					);
	    	document.colorCondition.submit();
	    
	}
	else
		alert("Wrong input value!");
}
$(function() {
	declareConfirmBox('comfirmDialogHandler');
    $( "#dialog-message" ).dialog({
        modal: true,
        autoOpen: false,
        buttons: {
            Ok: function() {
                $( this ).dialog( "close" );
            }
        }
    });
});
